﻿Imports RegExUtility.ViewModel

Public Class LiteralTextInputView

#Region "Events"
    ' Insert Event Declarations Here
#End Region

#Region "Properties"
#Region "Constants"
    ' Insert Constant Declarations Here
#End Region

    Private _viewModel As LiteralTextInputViewModel
    Public ReadOnly Property ViewModel As LiteralTextInputViewModel
        Get
            Return _viewModel
        End Get
    End Property

#End Region

#Region "Constructors"
    ' Insert Constructor Declarations Here
#End Region

#Region "Methods"
    ' Insert Method (Function/Sub) Declarations Here

#Region "Event Raiser Methods"
    ' Insert Method Declarations which Raise an Event Here
#End Region

#Region "Event Handlers"
    Private Sub LiteralTextInputView_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
        _viewModel = DirectCast(Me.DataContext, LiteralTextInputViewModel)
    End Sub

    Private Sub TreeView_SelectedItemChanged(sender As System.Object, e As System.Windows.RoutedPropertyChangedEventArgs(Of System.Object))
        If Me.ViewModel IsNot Nothing Then
            Dim l_regexViewModel = TryCast(e.NewValue, RegExUtility.ViewModel.RegexViewModelBase)
            Me.ViewModel.SelectedRegexItem = l_regexViewModel
        End If
    End Sub
#End Region
#End Region
End Class
